﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Television
{
    class Channel
    {
        private int channelNumber;
        private string channelName;

        public Channel(int number, string name)
        {
            if (ChannelNumber<0)
            {
                throw new ArgumentException();
            }
            ChannelNumber = number;
            ChannelName = name;
        }

        public int ChannelNumber
        {
            get
            {
                return channelNumber;
            }
            private set
            {
                channelNumber = value;
            }
        }

        public string ChannelName
        {
            get
            {
                return channelName;
            }
            private set
            {
                channelName = value;
            }
        }

        public void ShowCanalInfo()
        {
            Console.WriteLine("Channel number {0} is {1}.", ChannelNumber, ChannelName);
        }
    }
}
